home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 7: Sunsite / Linux Cubed Series 7 - Sunsite Vol 1.iso / system / network / admin / snmp-dev.000 / snmp-dev / Makefile < prev    next >
Encoding:
Makefile  |  1995-07-09  |  1.0 KB  |  39 lines

  1. MANDIR=/usr/local/man
  2. BINDIR=/usr/bin
  3. DAEMONDIR=/usr/sbin
  4. INCLUDE=/usr/include
  5. LIBDIR=/lib
  6. BINS=snmpbulkwalk snmpget snmpnetstat snmpset snmptest snmptranslate \
  7.     snmptrapd snmpwalk
  8. LIB=libsnmp.so.2.1.2l3
  9. HN=$(shell hostname | tr -d "\n" )
  10. DN=$(shell domainname | tr -d "\n" )
  11. FQDN=$(HN)\.$(DN)
  12. IP=$(shell host $(FQDN)|grep address|cut -f 4 -d " ")
  13.  
  14.  
  15.  
  16. test:
  17.     touch .test
  18.     rm .test
  19.     echo I show your hostname as \"$(HN)\" >> .test
  20.     echo and your domainname as \"$(DN)\" >> .test
  21.     echo making your fqdn \"$(FQDN)\". >>.test
  22.     echo Your IP address is \"$(IP)\".>>.test
  23.     echo If this is correct, type \"make install\". Otherwise,>>.test
  24.     echo hard code the proper values into the makefile. >>.test
  25.     echo ; cat .test | fold -w 79 -s ; echo ; echo ; rm .test
  26.  
  27. install:
  28.     cp *.8 $(MANDIR)/man8
  29.     cp *.5 $(MANDIR)/man5
  30.     cp *.3 $(MANDIR)/man3
  31.     cp *.1 $(MANDIR)/man1
  32.     cp snmpd $(DAEMONDIR)
  33.     cp $(BINS) $(BINDIR)
  34.     cp $(LIB) $(LIBDIR)
  35.     ln -s $(LIBDIR)/$(LIB) $(LIBDIR)/libsnmp.so.2
  36.     mkdir $(INCLUDE)/snmp
  37.     cp *.h $(INCLUDE)/snmp
  38.     ( cd etc ; installconf $(FQDN) $(IP) )
  39.